; Alt+Adventure. Time-stamp: <2016-08-13 03:54:13 teru>.
; 2016 08 03  Kitsuneon Guild, Teru.

(define-module (Kn_8630) #:version (0))

; (define kn-port 8630) ; of 65535.
; (define tile-size '(24 . 24)) ; pixels.

; - Segment: MOBs/Monsters.

;(define mobs
;  ;;
;  (vector
;   #("Name" 'details)))

;(define* (Monster a b c x y #:optional z) ...)

;(define (make-mob)
;  ; 00: Unsigned Int: Id.No.
;  ; 01: Int: Pos. x.
;  ; 02: Int: Pos. y.
;  ; 03: Int: HP.
;  ; 04: String: Name.
;  (make-vector 5))

;(define mobs (make-hash-table #xFF))

; - Segment: Global state.

(define p1 (make-hash-table))
(hash-set! p1 'Name (string-titlecase (getenv "USER")))
(hash-set! p1 'Score 0)
(hash-set! p1 'Location '(5 . 5)) ; map5,tile5.
(hash-set! p1 'Base-type 'Normal)
(hash-set! p1 'Armor '(Wooden . 3)) ; Wooden shield w/ 3 HP.
(hash-set! p1 'HP 9)
(hash-set! p1 'Brain 'Real) ; P1 is not an internal AI, but may still be a bot.

(define p2
  ; same parameters as p1; this time without labels/keys.
  (vector "Ruabot" 0 '(9 . 8) 'Monster #f 3 #f))

(define *turn*
  ; Whos turn is it, and how many turns have passed since start?
  '(p1 . 0))

(define *grid-weather* ;_;
  ; This one is crude, and global.
  ; CAR elt is which map is having a weather event 1..9,
  ; CDR elt is a bitvector of conditions:
  ; 0 = clear? or precipitation?
  ; 1 = liquid precipitation?
  ; 2 = solid precipitation?
  ; 3 = fogged/impaired visibility?
  ; 4 = wind?
  ; 5 = earthquake?/ground-shaking?
  ; 6 = falling-fire?
  ; 7 = cold?
  ; 8 = hot?
  (quote (0 . #*00000000)) #| No weather on all maps. |# )

; - Segment: Begin Main.

; (display "Kn: Exiting.\n")
; (exit EXIT_SUCCESS))
(display "Module Kn_8630 has been loaded.\n") ; For REPL testing.
(display "Use ,m Kn_8630 to access.\n")

; End of Kn_6901 main.scm File.
